import { DispatchCtrlLib } from './DispatchCtrlLib'
function DispatchCallbackNew() {}

DispatchCallbackNew.Initializersp=function(result){
  if(result == 0){
    NewPageLoginRsp();
    console.log("init success conferenceRoom_vue");
  } else {
    console.log("init fail conferenceRoom_vue");
  }
}
DispatchCallbackNew.UninitializeRsp=function(result){
  if(Parm.Result==0){

  }else{

  }
}

DispatchCallbackNew.LoginRsp=function(result,parm){

}

DispatchCallbackNew.LogoutRsp=function(result){
  if(result==0){
    /*处理登录回调*/
    LogoutRspdeal(result);
    console.log('注销成功')
  }else{
    console.log('注销失败')
  }
}

DispatchCallbackNew.ServerLinkStatusNotify=function(Parm){
  switch(Parm.Type){
    case 1:
      console.log('本地服务连接成功');
      break;
    case 2:
      console.log('本地服务断链');
      break;
    case 3:
      console.log('视频服务器连接成功');

      break;
    case 4:
      console.log('视频服务器断链');

      break;
    case 5:
      console.log('软交换服务器连接成功');
      break;
    case 6:
      console.log('软交换服务器断链');
      break;
    case 7:
      console.log('对讲服务器连接成功');

      break;
    case 8:
      console.log('对讲服务器断链');
      break;
    case 9:
      console.log('被踢下线');
      break;
  }
}

DispatchCallbackNew.MonitorVideoStatusNotify=function(parm){

}

DispatchCallbackNew.MonitorVideoIncomingCallNotify=function(parm){

}

DispatchCallbackNew.VoipCallStatusNotify=function(Type,Parm){

}

DispatchCallbackNew.VoipIncomingCallNotify=function(parm){
  let type ='VoipIncomingCallNotify';
}

DispatchCallbackNew.ConferenceStatusNotify=function(type,parm){
  NewPageConference(type, parm);
}

DispatchCallbackNew.ConferenceEnterNotify=function(type,parm){
  NewPageConference(type, parm);
}

DispatchCallbackNew.ConferenceInviteNotify=function(type,parm){
  NewPageConference(type, parm);
}



DispatchCallbackNew.LocStartSubscribeRsp=function(parm){

}

DispatchCallbackNew.LocUpdateNotify=function(parm){

}

DispatchCallbackNew.VideoFileRsp=function(parm){

}

DispatchCallbackNew.StatusNotify=function(obj){


}
//消息发送成功回调
DispatchCallbackNew.MsgSendRsp=function(parm){

}

DispatchCallbackNew.MsgRecvNotify=function(obj,TargetType,MsgType){

}

DispatchCallbackNew.ServerBroadcastNotify=function(Parm){

}

DispatchCallbackNew.LocalDevShowRsp=function(Parm){

}
//开始/取消监听应答
DispatchCallbackNew.PttMonitorRsp=function(Parm){

}
//发起/结束呼叫应答
DispatchCallbackNew.PttCallRsp=function(Parm){

}
////申请话权响应的事件
DispatchCallbackNew.PttTalkRequestRsp=function(Parm){

}
//释放话权响应的事件
DispatchCallbackNew.PttTalkReleaseRsp=function(Parm){

}
//呼叫监听状态应答
DispatchCallbackNew.PttCallStatusNotify=function(Parm){

}
//话权状态通知
DispatchCallbackNew.PttTalkStatusNotify=function(Parm){

}

DispatchCallbackNew.FenceNotify=function(Parm){

}

DispatchCallbackNew.FenceHandleNotify=function(Parm){

}

DispatchCallbackNew.PttDesktopPttNotify=function(Parm){

}

DispatchCallbackNew.WinMsgNotify=function(Parm){
  if(Parm.Target == "MainPage"&&Parm.Source == "VoicePage"){
    var content = Parm.Content;
    console.log(content.name);
    ScsMapConstant.voiceseparate = 0;
    $(".menu_left_voice").css("display","block");
    $("#shortcut_list_voice[data-menu='ip']").show();
    $("#shortcut_list_voice[data-menu='ipvid']").show();
  }
  if(Parm.Target == "MainPage"&&Parm.Source == "VideoPage"){
    var content = Parm.Content;
    console.log(content.name);
    ScsMapConstant.videoseparate = 0;
    $(".menu_left_video").css("display","block");
  }
  if(Parm.Target == "VoicePage"&&Parm.Source == "MainPage") {
    var content = Parm.Content;
    console.log(content.name);
    if ([null,'',undefined].indexOf(ScsMapConstant.isBs)!==-1) {
      window.Win_Exit();
    }else{
      if(parseInt(ScsMapConstant.isBs)===1 ){
        window.opener= null;
        window.open(' ','_self');
        window.close();
      }
    }
  }
  if(Parm.Target == "VideoPage"&&Parm.Source == "MainPage") {
    var content = Parm.Content;
    console.log(content.name);
    if ([null,'',undefined].indexOf(ScsMapConstant.isBs)!==-1) {
      window.Win_Exit();
    }else{
      if(parseInt(ScsMapConstant.isBs)===1 ){
        window.opener= null;
        window.open(' ','_self');
        window.close();
      }
    }
  }
}

DispatchCallbackNew.VoipDispatchMoniterStatusNotify=function(Type,Parm){

}

DispatchCallbackNew.VoipDispatchCallRsp=function(Parm){

}

DispatchCallbackNew.VoipHoldCallRsp=function(Parm){

}

DispatchCallbackNew.VoipTransferCallRsp=function(Parm){

}

DispatchCallbackNew.VoipDispatchFifoNotify=function(Type,Parm){

}
export { DispatchCallbackNew }
